package com.andreiamariei.tema6.entities;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.andreiamariei.tema6.entities.commons.BaseEntity;

@Entity
@Table(name="CATEGORIES")
public class Category extends BaseEntity{
	
	@Column(name="COD")
	private String cod;
	public String getCod() { return cod; }
	public void setCod(String cod) { this.cod = cod; }
	
	@Column(name="DESCRIERE")
	private String descriere;
	public String getDescriere() { return descriere; }
	public void setDescriere(String descriere) { this.descriere = descriere; }
	
	@ManyToMany(mappedBy="categories")
	private List<Movie> movies;
	public List<Movie> getMovies() { return movies; }
	public void setMovies(List<Movie> movies) { this.movies = movies; }

}
